import request from '@/utils/request.ts'
import { baseUrl } from '@/config/index'

// banner首页轮播图
export const banner = () => request.get(`${baseUrl}/banner/list`);
// 首页tabTab
export const Tab = () => request.get(`${baseUrl}/product/sort`);
// 首页tabContent
export const TabContent = (sort: string) => request.get(`${baseUrl}/product/list`, { params: { sort } });
// 分类页搜索
export const Search = (val: string) => request.get(`${baseUrl}/product/search`, { params: { val } });
// 分类页左侧tab 
export const SortLeft = () => request.get(`${baseUrl}/product/type`);
// 分类页右侧tab 
export const SortRight = (ttype: string) => request.get(`${baseUrl}/product/all`, { params: { ttype } });
// 分类页右侧tab 
export const ApiSortRightCon = (sort: string) => request.get(`${baseUrl}/product/list`, { params: { sort } });
// 详情 
export const DetailList = (pid: string) => request.get(`${baseUrl}/detail/${pid}`);

